package com.smart.primary.sys.service.impl;

import com.smart.primary.common.util.Util;
import com.smart.primary.sys.dao.DictMapper;
import com.smart.primary.sys.service.DictService;
import com.smart.primary.sys.vo.Dict;
import com.smart.primary.sys.vo.TreeNode;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.*;

@Service
public class DictServiceImpl implements DictService {

    @Resource
    private DictMapper sysDictMapper;

    public DictServiceImpl() {
    }

    public Dict queryObject(Dict sysDict) throws Exception {
        return (Dict)this.sysDictMapper.queryObject(sysDict);
    }

    public List<Dict> queryList(Dict sysDict) throws Exception {
        return this.sysDictMapper.queryList(sysDict);
    }

    public List<Dict> queryListByPage(Dict sysDict) throws Exception {
        return this.sysDictMapper.queryListByPage(sysDict);
    }

    public Integer queryCount(Dict sysDict) throws Exception {
        Integer ct = this.sysDictMapper.queryCount(sysDict);
        return ct == null ? 0 : ct;
    }

    public Integer insert(Dict sysDict) throws Exception {
        return this.sysDictMapper.insert(sysDict);
    }

    public Integer update(Dict sysDict) throws Exception {
        return this.sysDictMapper.update(sysDict);
    }

    public Integer delete(String dictNo) throws Exception {
        return this.sysDictMapper.delete(dictNo);
    }

}
